<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="icon" href="https://static.nowcoder.com/images/logo_87_87.png"/>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
          crossorigin="anonymous">
    <link rel="stylesheet" th:href="@{/css/global.css}"/>
    <title>网站数据统计</title>
</head>
<body>
<div class="nk-container">
    <!-- 头部 -->
    <header class="bg-dark sticky-top" th:replace="index::header">
    </header>

    <!-- 内容 -->
    <div class="main">
        <div class="container">
            <!-- 选项 -->
            <div class="position-relative">
                <ul class="nav nav-tabs">
                    <li class="nav-item">
                        <a class="nav-link" th:href="@{/admin/index}">权限管理</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link active" th:href="@{/admin/data}">网站数据</a>
                    </li>
                </ul>
            </div>
           		 <!-- 网站UV -->
			<div style="padding: 20px 30px">
                <h6 class="mt-3"><b class="square"></b> 网站 UV</h6>
                <form id="UVForm" class="form-inline mt-3" method="post" th:action="@{/admin/uv}"
                      onsubmit="return false">
                    <input type="date" name="startDate" class="form-control" required/>
                    <input type="date" name="endDate" class="form-control ml-3" required/>
                    <button type="button" onclick="getUV()" class="btn btn-primary ml-3">开始统计</button>
                </form>
                <ul class="list-group mt-3 mb-3">
                    <li class="list-group-item d-flex justify-content-between align-items-center">
                        统计结果
                        <span id="UVCount" class="badge badge-danger font-size-14">0</span>
                    </li>
                </ul>

            	<!-- 活跃用户 -->
                <h6 class="mt-3"><b class="square"></b> 活跃用户</h6>
                <form id="DAUForm" class="form-inline mt-3" method="post" th:action="@{/admin/dau}"
                      onsubmit="return false">
                    <input type="date" name="startDate" class="form-control" required/>
                    <input type="date" name="endDate" class="form-control ml-3" required/>
                    <button type="button" onclick="getDAU()" class="btn btn-primary ml-3">开始统计</button>
                </form>
                <ul class="list-group mt-3 mb-3">
                    <li class="list-group-item d-flex justify-content-between align-items-center">
                        统计结果
                        <span id="DAUCount" class="badge badge-danger font-size-14">0</span>
                    </li>
                </ul>
			</div>
        </div>
    </div>

    <!-- 尾部 -->
    <footer class="bg-dark" th:replace="index::footer">
    </footer>
</div>

<script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
        crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" crossorigin="anonymous"></script>
<script th:src="@{/js/global.js}"></script>
<script th:src="@{/js/data.js}"></script>

</body>
</html>
